<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

  <xsl:template match="*|/">
    <xsl:apply-templates/>
  </xsl:template>

  <xsl:template match="text()|@*">
    <xsl:value-of select="."/>
  </xsl:template>

  <xsl:template match='nbsp' name='nbsp'>
    <xsl:text disable-output-escaping='yes'>&amp;nbsp;</xsl:text>
  </xsl:template>

  <xsl:template match="Registration/Step2">

    <script type="text/javascript">

      function onRegistrationSubmit(e) {
      alert("ciao");
      }

      YAHOO.formRegistration.init = function () {

      function onPushButtonsMarkupReady() {
//      var oSubmitButton1 = new YAHOO.widget.Button("signup_submit", { id:"submitbutton1", type:"submit", disabled:"false" });
      }

      YAHOO.util.Event.onContentReady("formRegistration", onPushButtonsMarkupReady);
      //      YAHOO.util.Event.on("formRegistration", "submit", onRegistrationSubmit);

      } ();

    </script>




    <form name="formRegistration" id="formRegistration" method="post" action="userProfileChange.aspx?step=3">
      <div class="round_me" style="background:#FEEECC; padding:20px; margin:10px;">
        <table class="body" border="0">
          <tr>
              <td class='title' colspan='2'>
                <xsl:value-of select="@title"/>
                <br/>
                <br/>
              </td>
            </tr>
            <xsl:for-each select='Question'>
              <xsl:choose>

                <xsl:when test='@id="201"'>
                  <tr>
                    <td style='width:50%;'>
                      <xsl:value-of select="@description"/>
                    </td>
                    <td>
                      <select size="1" name="D{@id}">
                        <xsl:for-each select="Answer">
                          <xsl:choose>
                            <xsl:when test='@id=../@answid'>
                              <option value="{@id}" selected="true">
                                <xsl:value-of select="."/>
                              </option>
                            </xsl:when>
                            <xsl:otherwise>
                              <option value="{@id}">
                                <xsl:value-of select="."/>

                              </option>
                            </xsl:otherwise>
                          </xsl:choose>
                        </xsl:for-each>
                      </select>
                    </td>
                  </tr>
                </xsl:when>
                <xsl:when test='@id="202"'>
                  <tr>
                    <td>
                      <xsl:value-of select="@description"/>
                    </td>
                    <td>
                      <select size="1" name="D{@id}">
                        <xsl:for-each select="Answer">
                          <xsl:choose>
                            <xsl:when test='@id=../@answid'>
                              <option value="{@id}" selected="true">
                                <xsl:value-of select="."/>
                              </option>
                            </xsl:when>
                            <xsl:otherwise>
                              <option value="{@id}">
                                <xsl:value-of select="."/>
                              </option>
                            </xsl:otherwise>
                          </xsl:choose>
                        </xsl:for-each>
                      </select>
                    </td>
                  </tr>
                </xsl:when>
                <xsl:when test='@id="203"'>
                  <tr>
                    <td>
                      <xsl:value-of select="@description"/>
                    </td>
                    <td>
                      <select size="1" name="D{@id}">
                        <xsl:for-each select="Answer">
                          <xsl:choose>
                            <xsl:when test='@id=../@answid'>
                              <option value="{@id}" selected="true">
                                <xsl:value-of select="."/>
                              </option>
                            </xsl:when>
                            <xsl:otherwise>
                              <option value="{@id}">
                                <xsl:value-of select="."/>

                              </option>
                            </xsl:otherwise>
                          </xsl:choose>
                        </xsl:for-each>
                      </select>
                    </td>
                  </tr>
                </xsl:when>
                <xsl:when test='@id="204"'>
                  <tr>
                    <td>
                      <xsl:value-of select="@description"/>
                    </td>
                    <td>
                      <select size="1" name="D{@id}">
                        <xsl:for-each select="Answer">
                          <xsl:choose>
                            <xsl:when test='@id=../@answid'>
                              <option value="{@id}" selected="true">
                                <xsl:value-of select="."/>
                              </option>
                            </xsl:when>
                            <xsl:otherwise>
                              <option value="{@id}">
                                <xsl:value-of select="."/>

                              </option>
                            </xsl:otherwise>
                          </xsl:choose>
                        </xsl:for-each>
                      </select>
                    </td>
                  </tr>
                </xsl:when>
                <xsl:when test='@id="205"'>
                  <tr>
                    <td>
                      <xsl:value-of select="@description"/>
                    </td>
                    <td>
                      <select size="1" name="D{@id}">
                        <xsl:for-each select="Answer">
                          <xsl:choose>
                            <xsl:when test='@id=../@answid'>
                              <option value="{@id}" selected="true">
                                <xsl:value-of select="."/>
                              </option>
                            </xsl:when>
                            <xsl:otherwise>
                              <option value="{@id}">
                                <xsl:value-of select="."/>

                              </option>
                            </xsl:otherwise>
                          </xsl:choose>
                        </xsl:for-each>
                      </select>
                    </td>
                  </tr>
                </xsl:when>
                <xsl:when test='@id="206"'>
                  <tr>
                    <td>
                      <xsl:value-of select="@description"/>
                    </td>
                    <td>
                      <select size="1" name="D{@id}">
                        <xsl:for-each select="Answer">
                          <xsl:choose>
                            <xsl:when test='@id=../@answid'>
                              <option value="{@id}" selected="true">
                                <xsl:value-of select="."/>
                              </option>
                            </xsl:when>
                            <xsl:otherwise>
                              <option value="{@id}">
                                <xsl:value-of select="."/>
                              </option>
                            </xsl:otherwise>
                          </xsl:choose>
                        </xsl:for-each>
                      </select>
                    </td>
                  </tr>
                </xsl:when>
                <xsl:when test='@id="207"'>
                  <tr>
                    <td>
                      <xsl:value-of select="@description"/>
                    </td>
                    <td>
                      <select size="1" name="D{@id}">
                        <xsl:for-each select="Answer">
                          <xsl:choose>
                            <xsl:when test='@id=../@answid'>
                              <option value="{@id}" selected="true">
                                <xsl:value-of select="."/>
                              </option>
                            </xsl:when>
                            <xsl:otherwise>
                              <option value="{@id}">
                                <xsl:value-of select="."/>
                              </option>
                            </xsl:otherwise>
                          </xsl:choose>
                        </xsl:for-each>
                      </select>
                    </td>
                  </tr>
                </xsl:when>




              </xsl:choose>
            </xsl:for-each>

            <tr>
              <td colspan='2' align='right' style='padding-top:20px;padding-bottom:10px;'>
                <p class="submit">
                  <input type="submit" id="signup_submit" name="submit" value="Salva e prosegui con Aspetto Fisico"></input>
                </p>
              </td>

            </tr>

          </table>
        </div>
    </form>


  </xsl:template>

</xsl:stylesheet>